#include <windows.h>
#include <assert.h>

int main(void) {
	{
		PVOID pMemNew, pMem;
		HANDLE hHeap = HeapCreate(0, 0, 0);
		assert(hHeap);

		pMem = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, 1024);
		assert(pMem);
		sprintf(pMem, "hello world");

		pMemNew = HeapReAlloc(hHeap, HEAP_ZERO_MEMORY, pMem, 2048);
		assert(pMemNew);
		pMem = pMemNew;
		
		HeapFree(hHeap, 0, pMem);

		HeapDestroy(hHeap);
	}
	return 0;
}
